package com.soft.line.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ContractInfo {

    private Integer id;

    @ApiModelProperty(value = "部门ID")
    @NotNull(message = "部门不能为空")
    private String depId;

    @ApiModelProperty(value = "合同名称")
    @NotNull(message = "合同名称不能为空")
    @Length(max = 100,message="合同名称不能大于100位")
    private String contractName;

    @ApiModelProperty(value = "合同类别")
    @NotNull(message = "合同类别")
    private String contractType;

    @ApiModelProperty(value = "总金额")
    @NotNull(message = "总金额不能为空")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "甲方")
    @NotNull(message = "甲方不能为空")
    @Length(max = 100,message="甲方不能大于100字")
    private String partA;

    @ApiModelProperty(value = "乙方")
    @NotNull(message = "乙方不能为空")
    @Length(max = 100,message="乙方不能大于100字")
    private String partB;

    @ApiModelProperty(value = "其他签约方")
    @Length(max = 100,message="其他签约方不能大于100字")
    private String partC;

    @ApiModelProperty(value = "合同有效日期")
    @NotNull(message = "合同有效日期不能为空")
    @JsonFormat(pattern = "yyyyMMdd",timezone = "Asia/Shanghai")
    private Date signTime;

    @ApiModelProperty(value = "签约地点")
    @NotNull(message = "签约地点不能为空")
    @Length(max = 100,message="签约地点不能大于100位")
    private String signAddr;

    @ApiModelProperty(value = "开始时间")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyyMMdd",timezone = "Asia/Shanghai")
    private Date beginDate;

    @ApiModelProperty(value = "结束时间")
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyyMMdd",timezone = "Asia/Shanghai")
    private Date endDate;

    @ApiModelProperty(value = "支付方式")
    @NotNull(message = "支付方式不能为空")
    private String payment;

    @ApiModelProperty(value = "备注")
    @Length(max = 200,message="备注不能大于200字")
    private String note;

    private String modifyPerson;

    @JsonFormat(pattern = "yyyyMMdd",timezone = "Asia/Shanghai")
    private Date modifyTime;

    private String delFlg;

    @ApiModelProperty(value = "合同性质")
    @NotNull(message = "合同性质不能为空")
    private String contractNature;

    @ApiModelProperty(value = "项目编号")
    @Length(max = 50,message="项目编号不能大于50字")
    private String proId;

    @ApiModelProperty(value = "合同内容")
    @Length(max = 1000,message="合同内容不能大于1000字")
    private String contractContent;
}